﻿using System;

using SBPweb.PhotoGallery.Common;

namespace SBPweb.PhotoGallery.Client.Logic
{

    public class SlideFetchEventArgs : EventArgs
    {

        public SlideFetchEventArgs(FetchableSlide slide)
        {
            this.Slide = slide;
        }

        public FetchableSlide Slide;

    }

    public class SlideFetchErrorEventArgs : SlideFetchEventArgs
    {

        public SlideFetchErrorEventArgs(FetchableSlide slide, DownloadErrorEventArgs e)
            : base(slide)
        {
            this.Error = e.Error;
        }

        public Exception Error;

    }

    public class SlideFetchProgressEventArgs : SlideFetchEventArgs
    {

        public SlideFetchProgressEventArgs(FetchableSlide slide, DownloadProgressEventArgs e)
            : base(slide)
        {
            this.BytesReceived = e.BytesReceived;
            this.ProgressPercentage = e.ProgressPercentage;
            this.TotalBytesToReceive = e.TotalBytesToReceive;
        }

        public long BytesReceived;

        public long TotalBytesToReceive;

        public int ProgressPercentage;

    }

}